﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NGUYENTHANHDONG.OOP.Inhertance___Polimophism.TEST.EXCERCISE_01
{
    class HinhChuNhat: GeometricObject
    {
        double dai, rong;

       

        public HinhChuNhat()
        { }
        public HinhChuNhat(double dai, double rong)
        {
            this.dai = dai;
            this.rong = rong;
        }

        public override double GetPerimeter()
        {
            return (dai + rong) / 2;
        }

        public override double GetArea()
        {
            return rong * rong;
        }
    }
}
